home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d20
/
enet_201.arc
/
EXTR_NET.DOC
< prev
next >
Wrap
Text File
|
1992-01-15
|
5KB
|
98 lines
EXTR_NET
Version 2.01
Copyright (c) Bob Swift, 1988-91. All Rights Reserved.
Compiled with the Turbo C++ 1.0 compiler from Borland.
This program is designed to read an input nodelist file and extract
selected Networks, Regions and/or Zones. The extracted portions of
the nodelist are stored in a file specified on the command line.
The format for using this program is as follows:
EXTR_NET <srcfile> <destfile> <net1> <net2>...<net10>
where <srcfile> is the name of the nodelist file to be read
<destfile> is the name of the output file created
<net..> are the numbers of the Net/Region/Zones to be extracted
(the program is presently set to handle 10 numbers).
These numbers may be preceded by a N, R or Z in order
to extract the entire Net, Region or Zone. Examples
are: 123 N140 r17 Z1
The nodelist may be specified with a full drive and path. The destination
file must not have a drive or path specified. It will be output to the
current directory.
The program will display a VERY brief set of instructions if it is called
without any arguments or if it encounters an error. The following is a
list of the error codes returned by the program:
0 - No errors. Normal termination.
1 - Bad or missing command line argument.
2 - Unable to open the input file.
3 - Unable to open the output file.
4 - Problem writing to output file.
5 - Problem closing input file.
6 - Problem closing output file.
7 - Unable to open configuration file.
8 - Unable to create backup file.
When an error is encountered, the program will exit immediately and will
attempt to properly close all files.
Although I have chosen to retain all rights to this program, you are free
to use it under the following conditions:
- You realize that there is NO Warrantee of any sort.
It was tested pretty thoroughly here before release
but who knows what bugs may be lurking within.
- You will not modify the code and release a new version
of the program. I welcome suggestions for improvement
(especially when accompanied by code) but I make no
guarantee of future releases.
- If you find the program useful, I ask that you do
something to brighten somebody else's day. Just
exactly what, I will leave up to you.
You may freely distribute this program provided that you distribute only
the complete archive which includes the EXTR_NET.EXE, EXTR_NET.C and
EXTR_NET.DOC. In addition, You MUST NOT charge for the program nor can
you charge a copy fee over $4.00 (including the price of the diskette).
Bob Swift (1:140/24)
Revision History
----------------
1.00 88/11/08 First release version.
1.01 88/11/08 Correct a minor problem with file names and the
creation of the output backup file.
1.10 88/11/09 Finally corrected the null pointer and backup bug
for good this time. Someday I will learn to handle
strings properly <grin>. Also cleaned up the error
code handling section so that the error messages
make sense and included comment lines in output
file to show what input file was used and to
separate each extracted Net/Region.
2.00 89/05/07 Modified command line inputs slightly to allow
extraction of entire Net, Region or Zone by specifying
N, R or Z with the number. Numbers entered with no
specifier will be matched to anything but will only
extract until the next occurence of a Host, Region or
Zone statement. Also echoed the search criteria to
the output file.
2.01 91/12/28 Cleaned up comments in output file.